package com.yang.ioc_05;

import org.springframework.beans.factory.FactoryBean;

/**
 * @Description: TODO
 * @Author: Yang
 * @DateTime: 2024/5/24 16:15
 **/
public class JavaBeanFactoryBean implements FactoryBean<JavaBean> {

    private String value;

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public JavaBean getObject() throws Exception {
        JavaBean javaBean = new JavaBean();
        javaBean.setName(value);
        return javaBean;
    }

    @Override
    public Class<?> getObjectType() {
        return JavaBean.class;
    }
}
